const BASE_URL = "http://152.136.185.210:7878/api/hy66";
const BASE_URL2 = "https://weixin.jinhuang.com"
class KaRequest {
	constructor({
		baseurl
	}) {
		this.baseurl = baseurl;
	}


	request(url, method, data) {

		return new Promise((resolve, rej) => {

			uni.request({
				method,
				url: this.baseurl + url,
				success(res) {
					resolve(res.data)
				},
				data
			})
		})
	}


	get(url, params) {
		return this.request(url, "GET", params);
	}

	post(url, params) {
		return this.request(url, "POST", params)
	}



}

export default new KaRequest({
	baseurl: BASE_URL
});
